-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix always scrollable suggestion list #35319
Conversation
@Santhosh-Sellavel looks like this one is ready for you, thanks! |
Will check today |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add & update comments, comments are same on all files.
This is the platform-specific logic, look for ways to simplify this break into platform-specific methods instead of making code duplicate. |
I think you are looking at older commit, now its only checking type of web browser |
Yeah, that was from an old commit, we need to update correct height/top style for different platforms. Different wrappers in platform specific code to update them if required in implementions otherwise NOOP just return |
@situchan Hi! I have a question to the implementation I created - due the the face that we are splitting |
I don't like that approach. Most of codes are same but separated. |
@MrRefactor kindly bump #35319 (comment) |
Working on other solution rn, will push changes soon |
I tried that approach, but due to the fact that |
I was expecting super simple solution. Won't this work? + const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen();
...
'worklet';
const borderWidth = 2;
- const height = itemsHeight + 2 * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTER_INNER_PADDING;
+ const height = itemsHeight + 2 * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTER_INNER_PADDING + (canUseTouchScreen ? 0 : borderWidth);
// The suggester is positioned absolutely within the component that includes the input and RecipientLocalTime view (for non-expanded mode only). To position it correctly,
// we need to shift it by the suggester's height plus its padding and, if applicable, the height of the RecipientLocalTime view.
return {
overflow: 'hidden',
- top: -(height + CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTER_PADDING + borderWidth),
+ top: -(height + CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTER_PADDING + (canUseTouchScreen ? borderWidth : 0)),
height,
minHeight: CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT,
}; |
there are different values for native android, native iOS as well as mobile chrome, mobile safari and web so we cant implement it like that |
Why can't keep all values same between these platforms? I understand that they're still unnecessarily scrollable on iOS But the main bug we're trying to fix is to hide scroll bar on web, isn't it? |
If still persisting platform specific values, we can create platform files in /libs folder file similar to And just update code like this:
|
This PR introduced fix for bug with scroll on android and regression for other platforms. This PR is to keep fix on android and mobile Safari, then revert it on other platforms - iOS, mobile Chrome, Web, Desktop. So we are fixing the regression not only on Web |
@MrRefactor please check #35319 (comment) |
#35953 is a good example for your reference |
Added changes |
@MrRefactor thanks for applying my approach. Please merge main (7k+ commits are behind) |
merged! |
Merge didnt impact changes from this PR, working as expected @situchan |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrRefactor please do this change: ### Fixed Issues
- $ #27866
+ $ https://github.com/Expensify/App/issues/27866 |
src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.tsx
Outdated
Show resolved
Hide resolved
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
🚀 Deployed to staging by https://github.com/francoisl in version: 1.4.44-0 🚀
|
Failing in mweb with #27866. Evidence attached. |
It's expected. mSafari should behave same as production. |
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
Details
This PR concentrates on fixing the unwanted behaviour of always-scrollable suggestion list, which was introduced in the workaround. We are keeping previous fix on native android and iOS safari due to the fact that, the previous workaround is fixing other issue connected with broken scroll on these platforms.
Fixed Issues
$ #27866
PROPOSAL: #27866 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios-native.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web-chrome.mov
web-safari.mov
MacOS: Desktop
desktop.mov